package com.example.javapracticaltraining.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 员工信息主表
 * @TableName employee
 */
@TableName(value ="employee")
@Data
public class Employee {
    /**
     * 
     */
    @TableId(value = "employee_id", type = IdType.AUTO)
    private Integer employeeId;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 员工编号
     */
    @TableField(value = "employee_no")
    private String employeeNo;

    /**
     * 部门ID
     */
    @TableField(value = "department_id")
    private Integer departmentId;

    /**
     * 职位ID
     */
    @TableField(value = "position_id")
    private Integer positionId;

    /**
     * 入职日期
     */
    @TableField(value = "entry_date")
    private Date entryDate;

    /**
     * 合同开始日期
     */
    @TableField(value = "contract_start_date")
    private Date contractStartDate;

    /**
     * 合同结束日期
     */
    @TableField(value = "contract_end_date")
    private Date contractEndDate;

    /**
     * 学历
     */
    @TableField(value = "education")
    private String education;

    /**
     * 专业
     */
    @TableField(value = "major")
    private String major;

    /**
     * 毕业院校
     */
    @TableField(value = "graduation_school")
    private String graduationSchool;

    /**
     * 身份证号
     */
    @TableField(value = "id_card")
    private String idCard;

    /**
     * 银行账号
     */
    @TableField(value = "bank_account")
    private String bankAccount;

    /**
     * 紧急联系人
     */
    @TableField(value = "emergency_contact")
    private String emergencyContact;

    /**
     * 紧急联系电话
     */
    @TableField(value = "emergency_phone")
    private String emergencyPhone;

    /**
     * 员工状态
     */
    @TableField(value = "status")
    private Object status;

    /**
     * 工作经历
     */
    @TableField(value = "work_experience")
    private String workExperience;

    /**
     * 培训记录
     */
    @TableField(value = "training_records")
    private String trainingRecords;

    /**
     * 绩效考核记录
     */
    @TableField(value = "performance_reviews")
    private String performanceReviews;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Employee other = (Employee) that;
        return (this.getEmployeeId() == null ? other.getEmployeeId() == null : this.getEmployeeId().equals(other.getEmployeeId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getEmployeeNo() == null ? other.getEmployeeNo() == null : this.getEmployeeNo().equals(other.getEmployeeNo()))
            && (this.getDepartmentId() == null ? other.getDepartmentId() == null : this.getDepartmentId().equals(other.getDepartmentId()))
            && (this.getPositionId() == null ? other.getPositionId() == null : this.getPositionId().equals(other.getPositionId()))
            && (this.getEntryDate() == null ? other.getEntryDate() == null : this.getEntryDate().equals(other.getEntryDate()))
            && (this.getContractStartDate() == null ? other.getContractStartDate() == null : this.getContractStartDate().equals(other.getContractStartDate()))
            && (this.getContractEndDate() == null ? other.getContractEndDate() == null : this.getContractEndDate().equals(other.getContractEndDate()))
            && (this.getEducation() == null ? other.getEducation() == null : this.getEducation().equals(other.getEducation()))
            && (this.getMajor() == null ? other.getMajor() == null : this.getMajor().equals(other.getMajor()))
            && (this.getGraduationSchool() == null ? other.getGraduationSchool() == null : this.getGraduationSchool().equals(other.getGraduationSchool()))
            && (this.getIdCard() == null ? other.getIdCard() == null : this.getIdCard().equals(other.getIdCard()))
            && (this.getBankAccount() == null ? other.getBankAccount() == null : this.getBankAccount().equals(other.getBankAccount()))
            && (this.getEmergencyContact() == null ? other.getEmergencyContact() == null : this.getEmergencyContact().equals(other.getEmergencyContact()))
            && (this.getEmergencyPhone() == null ? other.getEmergencyPhone() == null : this.getEmergencyPhone().equals(other.getEmergencyPhone()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getWorkExperience() == null ? other.getWorkExperience() == null : this.getWorkExperience().equals(other.getWorkExperience()))
            && (this.getTrainingRecords() == null ? other.getTrainingRecords() == null : this.getTrainingRecords().equals(other.getTrainingRecords()))
            && (this.getPerformanceReviews() == null ? other.getPerformanceReviews() == null : this.getPerformanceReviews().equals(other.getPerformanceReviews()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getEmployeeId() == null) ? 0 : getEmployeeId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getEmployeeNo() == null) ? 0 : getEmployeeNo().hashCode());
        result = prime * result + ((getDepartmentId() == null) ? 0 : getDepartmentId().hashCode());
        result = prime * result + ((getPositionId() == null) ? 0 : getPositionId().hashCode());
        result = prime * result + ((getEntryDate() == null) ? 0 : getEntryDate().hashCode());
        result = prime * result + ((getContractStartDate() == null) ? 0 : getContractStartDate().hashCode());
        result = prime * result + ((getContractEndDate() == null) ? 0 : getContractEndDate().hashCode());
        result = prime * result + ((getEducation() == null) ? 0 : getEducation().hashCode());
        result = prime * result + ((getMajor() == null) ? 0 : getMajor().hashCode());
        result = prime * result + ((getGraduationSchool() == null) ? 0 : getGraduationSchool().hashCode());
        result = prime * result + ((getIdCard() == null) ? 0 : getIdCard().hashCode());
        result = prime * result + ((getBankAccount() == null) ? 0 : getBankAccount().hashCode());
        result = prime * result + ((getEmergencyContact() == null) ? 0 : getEmergencyContact().hashCode());
        result = prime * result + ((getEmergencyPhone() == null) ? 0 : getEmergencyPhone().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getWorkExperience() == null) ? 0 : getWorkExperience().hashCode());
        result = prime * result + ((getTrainingRecords() == null) ? 0 : getTrainingRecords().hashCode());
        result = prime * result + ((getPerformanceReviews() == null) ? 0 : getPerformanceReviews().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", employeeId=").append(employeeId);
        sb.append(", userId=").append(userId);
        sb.append(", employeeNo=").append(employeeNo);
        sb.append(", departmentId=").append(departmentId);
        sb.append(", positionId=").append(positionId);
        sb.append(", entryDate=").append(entryDate);
        sb.append(", contractStartDate=").append(contractStartDate);
        sb.append(", contractEndDate=").append(contractEndDate);
        sb.append(", education=").append(education);
        sb.append(", major=").append(major);
        sb.append(", graduationSchool=").append(graduationSchool);
        sb.append(", idCard=").append(idCard);
        sb.append(", bankAccount=").append(bankAccount);
        sb.append(", emergencyContact=").append(emergencyContact);
        sb.append(", emergencyPhone=").append(emergencyPhone);
        sb.append(", status=").append(status);
        sb.append(", workExperience=").append(workExperience);
        sb.append(", trainingRecords=").append(trainingRecords);
        sb.append(", performanceReviews=").append(performanceReviews);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append("]");
        return sb.toString();
    }
}